﻿namespace VehicleRental.Models
{
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    public class User
    {
        public int Id { get; set; }

        public string Username { get; set; }

        public string AuthCode { get; set; }

        public string AccessToken { get; set; }
        
        public virtual UserType UserType { get; set; }

        public virtual ICollection<Vehicle> RentedVehicles { get; set; }

        public User()
        {
            this.RentedVehicles = new HashSet<Vehicle>();
        }

        public string Email { get; set; }
    }
}
